package com.gopay.scheduler.job;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.gopay.scheduler.GopayBaseJob;
import com.gopay.scheduler.service.mobileproduct.waproduct.WaProductService;

/**
 * 移动端手机三充、视频会员卡有效期定时修改任务
 * UpdateWaProductValidityStatusJob.java
 * @author liuyu
 * @2017年06月09日 下午2:00:00  www.gopay.com.cn Inc.All rights reserved.
 */
public class UpdateWaProductValidityStatusJob extends GopayBaseJob {

    private Logger logger = LoggerFactory.getLogger(this.getClass());
    @Resource(name = "waProductService")
    private WaProductService waProductService;

    @Override
    protected void doJobInternal() {
        try {
            logger.info("手机三充以及视频会员卡商品有效状态及优惠状态修改开始！");
            waProductService.updateStatusByCron();
            logger.info("手机三充以及视频会员卡商品有效状态及优惠状态修改结束！");
        	
        } catch (Exception e) {
            logger.error("手机三充以及视频会员卡商品状态修改出错！", e);
        }
    }


}
